import requests

API_URL = "https://api-inference.huggingface.co/models/uer/gpt2-chinese-cluecorpussmall"
access_token = "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"
headers = {"Authorization": f"Bearer {access_token}"}
response = requests.post(API_URL, headers=headers, json={"inputs": "你好，hugging face！"})
print(response)
